<!--文档——瓦片地图（离线地图）-->
<!--
<template>
  <div>
    <div class="s-map-div">
      &lt;!&ndash; @click="pointClick" &ndash;&gt;
      <sl-map
        class="map"
        :zoom="map.zoom"
        :center="map.center"
        :projection="map.projection"
        @zoom="nothing"
        @ready="ready"
        :maxZoom="16"
        :minZoom="6"
      >
        &lt;!&ndash;弹层&ndash;&gt;
        <sl-infowindow :position="position">
          <device-info-modal
            v-if="clickInfoDeviceId&&clickInfoDeviceId.length>0"
            :deviceId="clickInfoDeviceId"
            :deviceData="clickDeviceData"
          ></device-info-modal>
        </sl-infowindow>
        &lt;!&ndash;绘制内容显示层&ndash;&gt;
        <sl-vector-layer :zIndex="100" id="drawLayer" name="绘制图层" :features="drawFeatures"></sl-vector-layer>
        &lt;!&ndash;绘制层(绘制面)&ndash;&gt;
        <sl-draw
          id="drawLayer"
          name="绘制图层"
          :actived="drawActive"
          @drawend="drawFinish"
          type="Polygon"
        ></sl-draw>
      </sl-map>
    </div>
  </div>
</template>

<script>
export default {
  name: "MapTile",
  data() {
    return {
      mapObj: "", //地图对象
      //地图的默认配置
      map: {
        center: [], //中心点
        zoom: 11, //地图缩放级别
        mapType: "0", //地图类型
        url: "", //地图瓦片地址
        projection: "EPSG:4326" //地图的投影坐标系,
      }
    };
  },
  methods: {
    //地图加载完成后的函数
    ready(obj) {
      this.mapObj = obj.map;
      //加载离线地图
      const layer = createLayer(this.mapObj, {
        isBaseMap: false,
        type: 4,
        config: { url: this.map.url }
      });

      //显示设备
      this.showDevicePoint();
    },
    //什么也不做
    nothing() {}
  }
};
</script>

<style scoped>
</style>
-->
